2017-18 Men's Tennis Roster
Season
There was a problem with a Velocity script | |
Page | sports/mten/2017-18/roster-headline-template |
Error | Invocation of method 'sortedBy' in class com.prestosports.content.HeadlinesSorter threw exception Only one : should be in a sort rule (first_name: :last_name) at kgu24ua6k8a7rxmxsports/mten/2017-18/roster-headline-template[line 628, column 55] |
Page source: |
1: $website.include("options") 2: #set ($options = $request.getAttribute("options")) 3: 4: #set ($rosterLayout = "list") 5: #set ($showHeadshotView = false) 6: #set ($isArchivePage = false) 7: 8: #if ($options.get("roster_show_headshot_view") == true) 9: #set ($showHeadshotView = true) 10: 11: #foreach ($cookie in $request.cookies) 12: #if ($cookie.name == "roster_view") 13: #set ($rosterLayout = $cookie.value) 14: #end 15: #end 16: #end 17: 18: #if ($options.get("roster_default_view")) 19: #set ($rosterLayout = $options.get("roster_default_view")) 20: #end 21: 22: #if ($request.getParameter("view")) 23: #set ($view = $request.getParameter("view")) 24: #if ($view == "list" || $view == "headshot") 25: #set ($rosterLayout = $view) 26: #end 27: #end 28: 29: #set ($rosterFields = ["number","first_name: :last_name","position","year","height","weight","hometown:/:highschool"]) 30: #set ($rosterLabels = ["#","Name","Pos.","Cl.","Ht.","Wt.","Hometown/High School"]) 31: #set ($rosterSortables = ["number","last_name","year","position"]) 32: 33: #if ($options.get("roster_fields") && $options.get("roster_labels")) 34: #set ($rosterFieldsString = $options.get("roster_fields")) 35: #set ($rosterLabelsString = $options.get("roster_labels")) 36: 37: #set ($rosterFieldsString = $rosterFieldsString.split(",")) 38: #set ($rosterLabelsString = $rosterLabelsString.split(",")) 39: 40: #set ($rosterFieldsSize = $tool.list.size($rosterFieldsString)) 41: #set ($rosterLabelsSize = $tool.list.size($rosterLabelsString)) 42: 43: #if ($rosterFieldsSize > 0 && $rosterLabelsSize > 0 && $rosterFieldsSize == $rosterLabelsSize) 44: #set ($rosterFields = $rosterFieldsString) 45: #set ($rosterLabels = $rosterLabelsString) 46: #end 47: #end 48: 49: #if ($request.getParameter("sort").length() > 0) ## when sort param is available, force the list layout 50: #set ($rosterLayout = "list") 51: #end 52: 53: #macro (printFieldValue $field $defaultValue) 54: #set ($fieldValue = "") 55: #if ($field.contains(">")) 56: #set ($orderedFields = $field.split(">")) 57: #foreach ($orderedField in $orderedFields) 58: #set ($orderedField = $orderedField.trim()) 59: #if ($bio.get($orderedField) && $fieldValue.length() == 0) 60: #set ($fieldValue = $bio.get($orderedField)) 61: #end 62: #end 63: #else 64: #if ($bio.get($field)) 65: #set ($fieldValue = $bio.get($field)) 66: #end 67: #end 68: #if ($fieldValue.length() > 0) 69: $fieldValue 70: #else 71: $defaultValue 72: #end 73: #end 74: 75: #macro (printField $field) 76: #set ($splitter = "") 77: #if ($field.contains(": :")) ## multipart fields separated by a space 78: #set ($splitter = ": :") 79: #elseif ($field.contains(":/:")) ## multipart fields separated by a / 80: #set ($splitter = ":/:") 81: #end 82: 83: #if ($splitter.length() > 0) 84: #set ($multipartField = $field.split($splitter)) 85: #foreach ($fieldPart in $multipartField) 86: #set ($fieldPart = $fieldPart.trim()) 87: #if ($velocityCount > 1) 88: $splitter.charAt(1) 89: #end 90: #printFieldValue($fieldPart "") 91: #end 92: #else 93: #printFieldValue($field " ") 94: #end 95: #end 96: 97: #macro (printPlayerAriaLabel $bioinfo) 98: #set ($jerseyNumber = "") 99: #set ($bio = $bioinfo.getDataAsObject().getAttributes()) 100: #if ($bio.get("full_name").length() > 0) 101: #set ($fullName = $bio.get("full_name")) 102: #else 103: #set ($firstName = $bio.get("first_name")) 104: #set ($lastName = $bio.get("last_name")) 105: #set ($fullName = "${firstName} ${lastName}") 106: #end 107: #if ($bio.get("number").length() > 0) 108: #set ($jerseyNumber = "jersey number ${bio.get('number')}") 109: #end 110: aria-label="${fullName}: ${jerseyNumber}: full bio" 111: #end 112: 113: #macro (printHeadshot $bioinfo $class) 114: #set ($bio = $bioinfo.getDataAsObject().getAttributes()) 115: #set ($alt = "${bio.get('first_name')} ${bio.get('last_name')} bio photo") 116: 117: #if ($bioinfo.publishedHeadshots.size() > 0) 118: #set ($src = $bioinfo.publishedHeadshots.get(0).url) 119: #elseif ($website.exists("/images/setup/default-headshot.png")) 120: #set ($src = "/images/setup/default-headshot.png") 121: #elseif ($website.exists("/images/setup/headshot_default.jpg")) 122: #set ($src = "/images/setup/headshot_default.jpg") 123: #else 124: #set ($src = "/info/images/default-headshot.png") 125: #end 126: 127: #set ($src = "${src}?max_height=576&max_width=576&crop=1") 128: <img class="img-fluid ${class}" src="${src}" alt="${alt}" tabindex="0" /> 129: #end ## macro printHeadshot 130: 131: #macro (printHeadshotBg $bioinfo) 132: #set ($bio = $bioinfo.getDataAsObject().getAttributes()) 133: #if ($bioinfo.publishedHeadshots.size() > 0) 134: #set ($src = $bioinfo.publishedHeadshots.get(0).url) 135: #elseif ($website.exists("/images/setup/default-headshot.png")) 136: #set ($src = "/images/setup/default-headshot.png") 137: #elseif ($website.exists("/images/setup/headshot_default.jpg")) 138: #set ($src = "/images/setup/headshot_default.jpg") 139: #else 140: #set ($src = "/info/images/default-headshot.png") 141: #end 142: #set ($src = "${src}?max_height=576&max_width=576&crop=1") 143: <div class="ratio ratio-1x1 d-block"> 144: <div style="background-image:url('${src}'); background-position:top center; background-size:cover;"></div> 145: </div> 146: #end ## macro printHeadshotBg 147: 148: 149: #macro (printBannerImage) 150: #if ($page.thumbnailURL) 151: #set ($rosterThumbSize = 1920) 152: #if ($tool.math.toInteger($options.get("roster_thumb_size"))) 153: #set ($rosterThumbSize = $tool.math.toInteger($options.get("roster_thumb_size"))) 154: #end 155: <div class="roster-banner-img text-center"> 156: <picture alt="${page.thumbnailPage.altText}"> 157: <source media="(min-width:1200px)" srcset="${page.thumbnailURL}?max_width=1920"> 158: <source media="(min-width:992px)" srcset="${page.thumbnailURL}?max_width=1199"> 159: <source media="(min-width:578px)" srcset="${page.thumbnailURL}?max_width=991"> 160: <source media="(min-width:0px)" srcset="${page.thumbnailURL}?max_width=576"> 161: <img class="img-fluid mx-auto" src="${page.thumbnailURL}?max_width=${rosterThumbSize}" alt="${page.thumbnailPage.altText}"/> 162: </picture> 163: </div> 164: #end 165: #end 166: 167: #macro (printArchiveList) 168: #if ($options.get("archive_roster")) 169: #set ($id = "roster-archive-switcher") 170: #if ($request.getParameter("id").length() > 0) 171: #set ($id = $request.getParameter("id")) 172: #end 173: 174: #set ($archiveRosterString = $options.get("archive_roster")) 175: #set ($archiveRosterString = $archiveRosterString.split(",")) 176: #set ($isArchivePage = false) 177: #if ($tool.list.size($archiveRosterString) > 0) 178: 179: <div id="${id}" class="archive-roster-switcher-template float-end"> 180: <div class="input-group"> 181: <span class="input-group-text" for="${id-options}-group-text">Archive Rosters</span> 182: <select class="form-select" id="${id}-options" aria-describedby="${id-options}-group-text" onchange="location=this.value;" aria-label="Change the season by selecting an option from the list below"> 183: #foreach ($string in $archiveRosterString) 184: #set ($archiveRoster = $string.split(":")) 185: #if ($tool.list.size($archiveRoster) == 2) 186: #set ($archiveUrl = $tool.list.get($archiveRoster, 0).trim()) 187: #set ($archiveLabel = $tool.list.get($archiveRoster, 1).trim()) 188: #if ($archiveUrl != $page.url) 189: <option value="$archiveUrl" data-url="$archiveUrl" data-title="$archiveLabel">$archiveLabel</option> 190: #else 191: <option value="$archiveUrl" data-url="$archiveUrl" data-title="$archiveLabel" selected>$archiveLabel</option> 192: #set ($isArchivePage = true) 193: #end 194: #end 195: #end 196: </select> 197: </div> 198: </div> 199: #end 200: #end 201: #end ## macro printArchiveList 202: 203: #macro (printCoachesJump) 204: <p class="d-print-none"> 205: <a href="#coaching-staff">View Coaching Staff</a> 206: </p> 207: #end 208: 209: #macro (printViewButtons) 210: #if ($showHeadshotView) 211: <div class="btn-group btn-group-toggle" role="group" data-bs-toggle="buttons"> 212: <a class="roster-view btn btn-outline-secondary #if($rosterLayout == 'list') active #end" data-view="list" href="$page.url?view=list"> 213: <span class="fas fa-list" aria-hidden="true"></span> 214: <span class="sr-only">List View</span> 215: </a> 216: <a class="roster-view btn btn-outline-secondary #if($rosterLayout == 'headshot') active #end" data-view="headshot" href="$page.url?view=headshot"> 217: <span class="fas fa-user" aria-hidden="true"></span> 218: <span class="sr-only">Headshot View</span> 219: </a> 220: </div> 221: #end 222: #end ## macro printViewButtons 223: 224: #set ($socialBrands = ["facebook", "twitter", "instagram", "youtube", "twitch", "tiktok"]) 225: 226: #macro (buildSocialLink $brand $handle $icons $class) 227: #if($brand == "facebook") 228: #set($socialHost = "https://www.facebook.com") 229: #elseif($brand == "twitter") 230: #set($socialHost = "https://twitter.com") 231: #elseif($brand == "instagram") 232: #set($socialHost = "https://www.instagram.com") 233: #elseif($brand == "tikTok") 234: #set($socialHost = "https://www.tiktok.com") 235: #elseif($brand == "twitch") 236: #set($socialHost = "https://www.twitch.tv") 237: #elseif($brand == "youtube") 238: #set($socialHost = "https://www.youtube.com") 239: #end 240: 241: #if($socialHost.length() > 0 ) 242: #set($url = "${socialHost}/${handle}") 243: #else 244: #set($url = "") 245: #end 246: 247: #set($icons = $Boolean.parseBoolean($icons)) 248: #if($icons == true) 249: <a href="$url" class="$class" target="_blank"><span aria-label="$brand" class="fa fa-brands #if($brand == 'twitter') fa-x-twitter #else fa-$brand.toLowerCase() #end"></span></a> 250: #else 251: <a href="$url" class="$class" target="_blank">$handle</a> 252: #end 253: #end 254: 255: 256: #macro (printListLayout) 257: #set ($rosterFields = ["number","first_name: :last_name","position","year","height","weight","hometown:/:highschool"]) 258: #set ($rosterLabels = ["#","Name","Pos.","Cl.","Ht.","Wt.","Hometown/High School"]) 259: #set ($rosterSortables = ["number","last_name","year","position"]) 260: 261: #if ($options.get("roster_fields") && $options.get("roster_labels")) 262: #set ($rosterFieldsString = $options.get("roster_fields")) 263: #set ($rosterLabelsString = $options.get("roster_labels")) 264: 265: #set ($rosterFieldsString = $rosterFieldsString.split(",")) 266: #set ($rosterLabelsString = $rosterLabelsString.split(",")) 267: 268: #set ($rosterFieldsSize = $tool.list.size($rosterFieldsString)) 269: #set ($rosterLabelsSize = $tool.list.size($rosterLabelsString)) 270: 271: #if ($rosterFieldsSize > 0 && $rosterLabelsSize > 0 && $rosterFieldsSize == $rosterLabelsSize) 272: #set ($rosterFields = $rosterFieldsString) 273: #set ($rosterLabels = $rosterLabelsString) 274: #end 275: #end 276: 277: #if ($options.get("roster_sortable")) 278: #set ($rosterSortablesString = $options.get("roster_sortable")) 279: #set ($rosterSortables = $rosterSortablesString.split(",")) 280: #end 281: 282: #set ($sortBy = "number") 283: #if($formatter.escapeXml($request.getParameter("sort")).length() > 0) 284: #set($sortBy = $formatter.escapeXml($request.getParameter("sort"))) 285: #end 286: #if ($sortBy.length() > 0) 287: #set ($headlines = $headlines.sortedBy($sortBy)) 288: #end 289: 290: <div class="table-responsive"> 291: <table class="table table-hover align-middle"> 292: <thead class="thead-dark"> 293: <tr> 294: #foreach($field in $rosterFields) 295: #set ($fieldLabel = $tool.list.get($rosterLabels, $tool.math.sub($velocityCount, 1))) 296: #set ($isSortable = false) 297: #set ($sortableField = "") 298: 299: #if ($tool.list.size($rosterSortables) > 0) 300: #foreach ($sortable in $rosterSortables) 301: #if ($field.contains($sortable)) 302: #set ($isSortable = true) 303: #set ($sortableField = $sortable) 304: #end 305: #end 306: #end 307: 308: #set ($ariaLabelColumn = $sortableField) 309: #if ($sortableField.contains('custom')) 310: #set ($ariaLabelColumn = $fieldLabel) 311: #end 312: 313: #set ($width = "") 314: #set ($align = "") 315: #if ($fieldLabel.equals('No.') || $fieldLabel.equals('#') || $fieldLabel.equals('Pos.') || $fieldLabel.equals('Cl.') || $fieldLabel.equals('Ht.') || $fieldLabel.equals('Wt.')) 316: #set ($width = "w-1") 317: #set ($align = "text-center") 318: #end 319: 320: <th scope="col" class="text-nowrap uppercase ${width} ${align} col${velocityCount} #if($isSortable)sortable #end #if($sortBy == $sortableField) sorted table-active #end"> 321: #if ($isSortable) 322: <a href="$page.url?sort=${sortableField}" title="Sort using this column" class="sortable text-reset" role="button" >${fieldLabel}</a> 323: #else 324: $fieldLabel 325: #end 326: </th> 327: #end 328: </tr> 329: </thead> 330: <tbody> 331: #foreach ($bioinfo in $headlines) 332: #set ($bio = $bioinfo.getDataAsObject().getAttributes()) 333: <tr> 334: #foreach($field in $rosterFields) 335: #set ($dataLabel = $tool.list.get($rosterLabels, $tool.math.sub($velocityCount, 1))) 336: #set ($isSortable = false) 337: #set ($sortableField = "") 338: 339: #if ($tool.list.size($rosterSortables) > 0) 340: #foreach ($sortable in $rosterSortables) 341: #if ($field.contains($sortable)) 342: #set ($isSortable = true) 343: #set ($sortableField = $sortable) 344: #end 345: #end 346: #end 347: 348: #set ($width = "") 349: #set ($align = "") 350: #if ($dataLabel.equals('No.') || $dataLabel.equals('#') || $dataLabel.equals('Pos.') || $dataLabel.equals('Cl.') || $dataLabel.equals('Ht.') || $dataLabel.equals('Wt.')) 351: #set ($align = "text-center") 352: #end 353: 354: #if ($field.contains("first_name") || $field.contains("last_name") || $field.contains("full_name")) 355: <th scope="row" class="text-inherit ${align} #if($sortBy == $sortableField) sorted table-active #end" data-label="${dataLabel}"> 356: <div class="d-flex align-items-center justify-content-start gap-2"> 357: <div class="player-image position-relative overflow-hidden"> 358: #printHeadshot($bioinfo "img-mw-3 img-mh-3") 359: </div> 360: <div class="w-100"> 361: <a #printPlayerAriaLabel($bioinfo) href="$bioinfo.url">#printField($field)</a> 362: <div class="social-links-inline d-inline-block ml-2 ms-2"> 363: <ul class="d-flex d-flex justify-content-between align-items-center p-0 m-0 gap-0" tabindex="0"> 364: #foreach ($brand in $socialBrands) 365: #if ($bio.get("$brand").length()) 366: #set($link = $bio.get("$brand")) 367: <li class="d-flex justify-content-between align-items-center flex-column"> 368: #buildSocialLink($brand.toLowerCase(), $link, true, "fs-sm small p-1") 369: </li> 370: #end 371: #end 372: </ul> 373: </div> 374: </div> 375: </div> 376: 377: </th> 378: #else 379: #if ($dataLabel.equals("Pos.") || $dataLabel.equals("Num.") || $dataLabel.equals("Wt.") || $dataLabel.equals("Ht.") || $dataLabel.equals("Cl.") || $dataLabel.equals("B/T")) 380: #set ($textWrapClass = "text-nowrap") 381: #else 382: #set ($textWrapClass = "text-inherit") 383: #end 384: <td class="$textWrapClass ${align} #if ($dataLabel.equals('No.') || $dataLabel.equals('#')) jersey-number #end #if($sortBy == $sortableField) sorted table-active #end" data-label="${dataLabel}"> 385: #if($dataLabel != "#" && $dataLabel !="No.") 386: <span class="label fw-bold d-md-none">${dataLabel}:</span> 387: #end 388: 389: #if ($field.contains("email_address")) 390: <a href="mailto:${bio.get("email_address")}">#printField($field)</a> 391: #else 392: #printField($field) 393: #end 394: </td> 395: #end 396: #end 397: </tr> 398: #end 399: </tbody> 400: </table> 401: </div> 402: #end ## macro printListLayout 403: 404: #macro (printHeadshotLayout) 405: #set ($headshotSize = "medium") 406: #if ($options.get("roster_headshot_size")) 407: #set ($headshotSize = $options.get("roster_headshot_size")) 408: #end 409: 410: <div class="roster-headshot-container"> 411: <div class="row player-cards g-3 position-relative headshot-size-${headshotSize}"> 412: #foreach ($bioinfo in $headlines) 413: #if($headshotSize == "large") 414: #set ($cardClass = "col-12 col-sm-6 col-md-4 col-lg-4") 415: #elseif($headshotSize == "medium") 416: #set ($cardClass = "col-12 col-sm-6 col-md-4 col-lg-3") 417: #elseif($headshotSize == "small") 418: #set ($cardClass = "col-12 col-sm-6 col-md-4 col-lg-2") 419: #end 420: 421: #set ($bio = $bioinfo.getDataAsObject().getAttributes()) 422: <div class="player-card-wrapper ${cardClass} d-flex align-items-stretch position-relative"> 423: <div class="player-card card shadow w-100"> 424: <div #printPlayerAriaLabel($bioinfo) class="card-front card-data w-100 h-100 bg-white rounded d-flex flex-column align-items-center justify-content-between"> 425: <div class="player-image position-relative w-100 overflow-hidden"> 426: #printHeadshotBg($bioinfo) 427: </div> 428: <div class="player-card-footer p-3 position-relative w-100"> 429: <div class="d-flex justify-content-between align-items-center flex-grow w-100"> 430: <div class="vm-btn btn btn-sm btn-secondary overflow-hidden position-absolute fw-bold z-index-1 lh-base" style="line-height:initial;"><span class="fa fa-ellipsis-v"></span><span class="sr-only visually-hidden">View More</span></div> 431: <div class="bio-card-name-and-year"> 432: #if ($bio.get("first_name") && $bio.get("last_name")) 433: <a href="$bioinfo.url" class="text-decoration-none flex-fill"> 434: <span class="name"> 435: <span class="firstname text-truncate d-block fs-6">$bio.get("first_name")</span> 436: <span class="lastname text-truncate d-block fs-5">$bio.get("last_name")</span> 437: </span> 438: </a> 439: #end 440: </div> 441: <ul class="d-flex d-flex justify-content-between align-items-center p-0 m-0 gap-2" tabindex="0"> 442: #foreach ($brand in $socialBrands) 443: #if ($bio.get("$brand").length()) 444: #set($link = $bio.get("$brand")) 445: <li class="d-flex justify-content-between align-items-center flex-column"> 446: #buildSocialLink($brand.toLowerCase(), $link, true, "") 447: </li> 448: #end 449: #end 450: </ul> 451: 452: #if ($bio.get("number") && $!bio.get("number").length() > 0) 453: <span class="number fw-bold position-relative float-end text-center text-white" tabindex="-1" aria-label="Jersey Number $bio.get('number')">$bio.get("number")</span> 454: #end 455: </div> 456: <div class="bio-attr-short d-flex align-items-center justify-content-start gap-2 mt-1 w-100"> 457: #if ($bio.get("position").length() > 0) 458: <span class="text-muted">$bio.get("position")</span> 459: #end 460: #if($bio.get("year").length() > 0) 461: <span class="text-muted">$bio.get("year")</span> 462: #end 463: #if ($bio.get("height").length() > 0) 464: <span class="text-muted">$bio.get("height")</span> 465: #end 466: #if ($bio.get("bats_throws").length() > 0) 467: <span class="text-muted">$bio.get("bats_throws")</span> 468: #end 469: </div> 470: </div> 471: </div> 472: <div class="player-short-bio card-back card-data w-100 h-100 overflow-hidden p-3 position-absolute" > 473: <div class="bio-content d-flex flex-column gap-3 h-100"> 474: <div class="card-back-head pb-3"> 475: #if ($bio.get("first_name") && $bio.get("last_name")) 476: <div class="name d-flex align-items-center justify-content-start gap-3 p-0"> 477: <div class="pl-profile w-25 h-100"> 478: #printHeadshot($bioinfo "w-100") 479: </div> 480: <div class="pl-name-wrap d-flex flex-column gap-2"> 481: #if ($bio.get("number") && $!bio.get("number").length() > 0) 482: <span class="number fw-bold fs-5 nowrap">#$bio.get("number")</span> 483: #end 484: <div class="pl-name text-decoration-none mt-0"> 485: <span class="firstname text-truncate d-block fs-6">$bio.get("first_name")</span> 486: <span class="lastname text-truncate d-block fs-5">$bio.get("last_name")</span> 487: </div> 488: </div> 489: </div> 490: #end 491: <span class="close position-absolute btn btn-sm btn-link"> 492: <span class="fa fa-close fa-times" aria-hidden="true"></span> 493: <span class="visually-hidden">Close</span> 494: </span> 495: </div> 496: <div class="bio-data"> 497: <ul class="list-unstyled small"> 498: #if ($bio.get("position").length() > 0) 499: <li tabindex="0" class="p-0 m-0"><span class="fw-bold">Position:</span> $bio.get("position")</li> 500: #end 501: #if ($bio.get("year").length() > 0) 502: <li tabindex="0" class="p-0 m-0"><span class="fw-bold">Class:</span> $bio.get("year")</li> 503: #end 504: #if ($bio.get("height").length() > 0) 505: <li tabindex="0" class="p-0 m-0"><span class="fw-bold">Height:</span> $bio.get("height")</li> 506: #end 507: #if ($bio.get("bats_throws").length() > 0) 508: <li tabindex="0" class="p-0 m-0"><span class="fw-bold">B/T:</span> $bio.get("bats_throws")</li> 509: #end 510: #if ($bio.get("hometown").length() > 0) 511: <li tabindex="0" class="p-0 m-0"><span class="fw-bold">Hometown:</span> $bio.get("hometown")</li> 512: #end 513: #if ($bio.get("highschool").length() > 0) 514: <li tabindex="0" class="p-0 m-0"><span class="fw-bold">Highschool:</span> $bio.get("highschool")</li> 515: #end 516: <li tabindex="0" class="p-0 m-0"> 517: <ul class="list-group list-group-horizontal p-0 mt-2" tabindex="0"> 518: #foreach ($brand in $socialBrands) 519: #if ($bio.get("$brand").length()) 520: #set($link = $bio.get("$brand")) 521: <li class="list-group-item p-2"> 522: #buildSocialLink($brand.toLowerCase(), $link, true, "") 523: </li> 524: #end 525: #end 526: </ul> 527: </li> 528: </ul> 529: </div> 530: <a href="$bioinfo.url" class="btn btn-primary full-bio fw-bold btn-block text-center overflow-hidden">Full Bio</a> 531: </div> 532: </div> 533: </div> 534: </div> 535: #end 536: </div> 537: </div> 538: #end ## macro printHeadshotLayout 539: 540: #if ($request.getParameter("ajax").length() > 0) 541: 542: #if ($rosterLayout == "list") 543: #printListLayout 544: #elseif ($rosterLayout == "headshot") 545: #printHeadshotLayout 546: #end 547: 548: $website.decorate("") 549: 550: #else 551: <div class="page-content roster-content" data-module="bs-scripts/roster-layout" data-page-url="$page.url" data-page-title="$!page.title - ${website.profile.siteName}"> 552: 553: ## USED TO CREATE COACHES LIST AT BOTTOM OF THE PAGE AND TO CREATE JUMP LINK AT THE TOP 554: #set($showCoaches = false) 555: #if ($!options.get("roster_show_coaches") != "false" ) 556: #if ($request.getRequestURI().split("/").size() > 2 && $request.getRequestURI().split("/").get(1) == "sports") 557: #set($sport_directory = $request.getRequestURI().split("/").get(1)) 558: #set($sport_type = $request.getRequestURI().split("/").get(2)) 559: #set($sport_season = $request.getRequestURI().split("/").get(3)) 560: #set($coaches_url = "/${sport_directory}/${sport_type}/coaches/index") 561: 562: #if ($website.exists($coaches_url) && $request.getRequestURI().contains("roster")) 563: #set($showCoaches = true) 564: #set($coaches_heading = "Coaching Staff") 565: $website.includeAgain("sport-labels") 566: #set ($sportLabels = $!request.getAttribute("sportLabels")) 567: #if ($sportLabels.containsKey($sport_type)) 568: #set ($sport = $sportLabels.get($sport_type)) 569: ## #set($coaches_heading = "${sport} Coaching Staff") 570: #set($coaches_heading = "Coaching Staff") 571: #end 572: #end 573: #end 574: #end 575: 576: ## END OF NEW COACHES LIST INCLUDE 577: 578: #set ($pageTitle = "Roster") 579: #if ($page.title.length() > 0) 580: #set ($pageTitle = $page.title) 581: #end 582: #if ($page.title.length() > 0) 583: <h1 class="page-heading">$pageTitle</h1> 584: #end 585: $!request.setAttribute("pageTitle", "${pageTitle}") 586: $!request.setAttribute("pageDescription", "The official $pageDescription") 587: 588: #printBannerImage 589: 590: <div class="filters d-flex flex-column flex-md-row justify-content-between p-3 border gap-3 my-3"> 591: <div class="flex-fill d-flex justify-content-between gap-3"> 592: <div role="group" aria-label="Print friendly version"> 593: <a href="${page.url}?dec=printer-decorator" class="btn btn-outline-secondary"><span class="fa fa-print"></span> Print</a> 594: </div> 595: 596: #printViewButtons 597: </div> 598: 599: $!request.setAttribute("pageObj", $page) 600: <div class="flex-fill"> 601: $website.include("conf-season-filter-template") 602: </div> 603: 604: ##printArchiveList 605: </div> 606: 607: ## checks if the attribute was set by the season vilter builder script. 608: ## the location of this conditional should always be placed after the season filter include has been made. 609: #set ($currentSeason = $!request.getAttribute("current_season")) 610: #if (!$page.url.contains("${currentSeason}")) 611: #set ($isArchivePage = true) 612: #end 613: 614: #if($showCoaches == true && $isArchivePage == false) 615: #printCoachesJump 616: #end 617: 618: #if ($rosterLayout == "list") 619: 620: #if ($options.get("roster_sortable")) 621: #set ($rosterSortablesString = $options.get("roster_sortable")) 622: #set ($rosterSortables = $rosterSortablesString.split(",")) 623: #end 624: 625: #set ($sortBy = "") 626: #set($sortBy = $request.getParameter("sort")) 627: #if ($sortBy.length() > 0) 628: #set ($headlines = $headlines.sortedBy($sortBy)) 629: #end 630: 631: <div class="roster-data style-list">#printListLayout</div> 632: 633: #elseif ($rosterLayout == "headshot") 634: <div class="roster-data style-headshot">#printHeadshotLayout</div> 635: 636: #end ## roster-layout 637: 638: #set ($rosterFooter = "${page.url}-footer") 639: #if ($website.exists($rosterFooter)) 640: <div class="roster-footer" data-fetch="$rosterFooter">$website.include($rosterFooter)</div> 641: #end 642: 643: #if ($showCoaches == true && $isArchivePage == false) 644: <h2 class="invisible d-none">Coaching Staff</h2> 645: <h3 class="mt-5" id="coaching-staff">${coaches_heading}</h3> 646: <div class="roster-coaches" data-coaches-url="${coaches_url}">$website.includeAgain("${coaches_url}?tmpl=headlines-coaches-template&ajax=true")</div> 647: #end 648: 649: 650: </div> ## page-content 651: 652: ## GLOBAL ADS SERVER 653: #if ($website.ads.isAdvertisingEnabled('ROSTER')) 654: $website.includeAgain("global-adserver-slots?adSlot=roster") 655: #end 656: 657: #end ## if ajax 658: 659: <script type="text/javascript"> 660: $(".vm-btn").click(function(e){ 661: e.preventDefault(); 662: $('.player-card.flipped').removeClass('flipped'); 663: $(this).closest('.player-card').addClass('flipped'); 664: e.stopPropagation(); 665: }); 666: 667: $(document).on("click", function(e) { 668: if ($(e.target).is(".player-card") === false) { 669: $(".player-card").removeClass("flipped"); 670: } 671: }); 672: 673: $(".card-back .close").click(function(){ 674: $(".player-card").removeClass("flipped"); 675: }); 676: </script> |